package cn.com.fattiger.framework.cms.config;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;


@Repository
public class TestDao {

	@Resource(name="jdbcTemplate")
	private JdbcTemplate jdbcTemplate;

	/*public List<Category> loadAll(){
		String sql = "select * from category";
		List<Category> categories = jdbcTemplate.query(sql, new RowMapper<Category>(){

			@Override
			public Category mapRow(ResultSet rs, int rowNum) throws SQLException {
				// TODO Auto-generated method stub
				Category category = new Category();
				category.setId(rs.getInt("id"));
				category.setName(rs.getString("name"));
				return category;
			}
			
		});
		
		return categories;
	}*/

}
